//package com.mg.pluginwebservice.util;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import org.apache.cxf.endpoint.Client;
//import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
//
//public class CXFClientFactory {
//
//    public static JSONObject executeMethod(String wsdlUrl, String method, JSONObject param) {
//
//        JSONObject data = null;
//        // 创建动态客户端
//        JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
//        Client client = dcf.createClient(wsdlUrl); //"http://localhost:8099/ws/dataShare?wsdl"
//
//        Object[] objects = new Object[0];
//        try {
//            // invoke("方法名",参数1,参数2,参数3....);
//            objects = client.invoke(method, param.toJSONString());
//
//            data = (JSONObject) JSONObject.parse(JSON.toJSONString(objects[0]));
//        } catch (java.lang.Exception e) {
//            e.printStackTrace();
//        }
//        return data;
//    }
//}
